Subject: Re: Multiple connect()s with SOCK_DGRAM sockets?
From: [email-masked] (Bob Quinn)
To: [email-masked]
Cc: Multiple recipients of list <[email-masked]>
Date: Tue, 30 Nov 93 12:12:32 -0500

Hi Paul!

>  What is the feeling of the community in allowing multiple connect() calls
>  on SOCK_DGRAM sockets? I have several conflicting points either way:
...
>  Since I've been informed more than once that the aim is "BSD compatibility",
>  and if the Winsock spec differs from BSD behaviour, the BSD behaviour is what
>  should be followed, I would like to propose some standard behaviour for

Agreed.

>  1)      A connected SOCK_DGRAM socket can be "dis-connected" by calling
>          connect() again with a destination 'name' consisting of address and
>          port containing all zeros, and a valid family for the socket
>          (i.e. "AF_INET / 0 / 0.0.0.0").

The address 0.0.0.0 is the value for INADDR_ANY which should cause
connect() to fail with WSAEDESTADDRREQ.  What about using INADDR_NONE
instead?

>  2)      A connected SOCK_DGRAM must be dis-connected using this method before
>          it can be re-connected again, to the same or different destination
>          address, otherwise an error code of WSAEISCONN will be returned
>          (just like should happen now).

Why should you have to disconnect, it's not like there's a real
connection to close?  All a UDP connect() does is change the foreign
IP Address and/or foreign port in the "association" (the 5-tuple of
Protocol, Local IP Addr, Local Port, Foreign IP Addr and Foreign Port).
I can't think of any reason why it should fail, as long as they
provide a valid foreign address (i.e. an address other than 0.0.0.0).

Regards,
--
 Bob Quinn                                             [email-masked]
 FTP Software, Inc.                                No. Andover, MA